$(document).ready(function() {
  $(".download-head .download-area .download-immediately .ios").mouseover(
    function() {
      $(".download-head .download-area .download-immediately .ios").css({
        "background-color": "#1e90ff",
        border: "2px solid transparent"
      });
    }
  );
  $(".download-head .download-area .download-immediately .ios").mouseout(
    function() {
      $(".download-head .download-area .download-immediately .ios").css({
        "background-color": "transparent",
        border: "2px solid #fff"
      });
    }
  );
  $(".download-head .download-area .download-immediately .android").mouseover(
    function() {
      $(".download-head .download-area .download-immediately .android").css({
        "background-color": "#1e90ff",
        border: "2px solid transparent"
      });
    }
  );
  $(".download-head .download-area .download-immediately .android").mouseout(
    function() {
      $(".download-head .download-area .download-immediately .android").css({
        "background-color": "transparent",
        border: "2px solid #fff"
      });
    }
  );
  $(window).scroll(function() {
    if ($(window).scrollTop() >= 200) {
      $(".recommend .left,.recommend .right").css(
        "animation-play-state",
        "running"
      );
    }
    if ($(window).scrollTop() >= 1000) {
      $(".game .left,.game .right").css("animation-play-state", "running");
    }
    if ($(window).scrollTop() >= 1800) {
      $(".fiction .left,.fiction .right").css(
        "animation-play-state",
        "running"
      );
    }
  });
});
$(document).ready(function() {
  $(window).scroll(function() {
    if ($(window).scrollTop() >= 1359) {
      function transformNumber() {
        $(".fiction .danmu .img-1").css({
          "right": "2363px",
          "transition": "right 20s linear",
          "opacity": "1"
        });
        $(".fiction .danmu .img-2").css({
          "right": "2463px",
          "transition": "right 20s 1s linear",
          "opacity": "1"
        });
        $(".fiction .danmu .img-3").css({
          "right": "2263px",
          "transition": "right 20s 2s linear",
          "opacity": "1"
        });
        $(".fiction .danmu .img-4").css({
          "right": "2263px",
          "transition": "right 20s 3s linear",
          "opacity": "1"
        });
      }
      transformNumber();
      setInterval(function() {
        transformNumber();
      }, 25000);

      function transformNumbers_1() {
        // $(".fiction .danmu img").css({
        //   "transform": "translate(620px, 0px)",
        //   "display": "none","transition":"meiyou 1s both"
        // });
        $(".fiction .danmu .img-1").css({
          "right": "-762px",
          "transition": "right .1s",
          "opacity": "0"
        });
        $(".fiction .danmu .img-2").css({
          "right": "-782px",
          "transition": "right .1s",
          "opacity": "0"
        });
        $(".fiction .danmu .img-3").css({
          "right": "-720px",
          "transition": "right .1s",
          "opacity": "0"
        });
        $(".fiction .danmu .img-4").css({
          "right": "-722px",
          "transition": "right .1s",
          "opacity": "0"
        });
      }
      setInterval(function() {
        transformNumbers_1();
      }, 24000);
    }
  });
});
